<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Admin:Add Equity</title>
<link rel="stylesheet" type="text/css"
	href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" />
<script type="text/javascript"
	src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript"
	src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
</head>
<body>
	<h5>
		<fmt:message key="admin_add_equity_pg_title"></fmt:message>
	</h5>
	<form:form method="post" modelAttribute="equity">
		<form:errors cssClass="error" />
		<c:if test="${successFlag}">
			<h6>
				<fmt:message key="successMsg" />
			</h6>
		</c:if>
		<table>
			<tr>
				<td>Equity Name:</td>
				<td><form:input path="equityName" /> <form:errors
						path="equityName" cssClass="error" /></td>
			</tr>
			<tr>
				<td>Equity BSE Code:</td>
				<td><form:input path="equityBSE" /> <form:errors
						path="equityBSE" cssClass="error" /></td>
			</tr>
			<tr>
				<td>Equity NSE Code:</td>
				<td><form:input path="equityNSE" /> <form:errors
						path="equityNSE" cssClass="error" /></td>
			</tr>
			<tr>
				<td>Equity ISIN:</td>
				<td><form:input path="equityISIN" /> <form:errors
						path="equityISIN" cssClass="error" /></td>
			</tr>
			<tr>
				<td>Sector:</td>
				<td><form:select path="equitySector.sectorId">
						<form:option value="0">-- Please Select --</form:option>
						<form:options items="${sectorDD}" itemValue="sectorId"
							itemLabel="sectorName" />	
					</form:select> 
					<form:errors path="equitySector.sectorId" cssClass="error" />
				</td>
				<%-- <td><form:input path="equitySector.sectorId" id="sector" /></td> --%>
			</tr>
		</table>
		<br class="clearfix">
		<div class="buttons">
			<button type="submit" class="positive" name="add">Add</button>
			<button type="reset" class="standard" name="reset">Reset</button>
		</div>
	</</form:form>
	<!-- <script type="text/javascript">
		$(document)
				.ready(
						function() {
							$("#sector")
									.autocomplete(
											{
												source : '${pageContext. request. contextPath}/admin_add_equity/getSectorList',
												minlength : 3,
												delay : 1000
											});
						});
	</script> -->
</body>
</html>